package cn.com.jenson.entity.file;

import cn.com.jenson.common.BasicEntity;
import cn.com.jenson.dao.file.bo.FileBo;
import cn.com.jenson.system.EntityTable;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.web.multipart.MultipartFile;

import javax.persistence.Entity;
import javax.persistence.Table;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Entity
public class Sharding extends BasicEntity {
    private Integer fileId;
    private Integer number;
    private Integer count;
    private String fileName;
    private String filePath;

    public Sharding(FileBo fileBo) {
        this.fileId = fileBo.getId();
        this.number = fileBo.getNumber();
        this.count = fileBo.getCount();
        this.fileName = fileBo.getFileName();
        this.filePath = fileBo.getFilePath();
    }
}
